import { defineStore } from 'pinia'

export const mainStore = defineStore({
    id: 'main',
    state: () => {
        return {
            name: '张三'
        }
    },
    getters: {
        getName() {
            return "hi"+this.name
        },
    },
    actions: {
        updateName(name) {
            this.name = name
        },
        async login(account, pwd) {
            // const { data } = await api.login(account, pwd)
            return {}
        }
    }
})